package com.ss.progress.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ss.progress.dao.CalendarDao;
import com.ss.progress.pojo.CalendarDetailInfo;
import com.ss.progress.pojo.CalendarInfo;
import com.ss.progress.service.CalendarService;
/**
 * 教学日历服务实现类
 * @author Administrator
 *
 */
@Service("calendarService")
public class CalendarServiceImpl implements CalendarService{

	@Autowired
	private CalendarDao dao;
	
	@Override
	public List<CalendarInfo> queryCalendar(CalendarInfo info) throws Exception {
		// TODO Auto-generated method stub
		return dao.queryCalendar(info);
	}

	@Override
	public void addCalendar(CalendarInfo info) throws Exception {
		// TODO Auto-generated method stub
		dao.addCalendar(info);
	}

	@Override
	public boolean updateCalendar(CalendarInfo info) throws Exception {
		// TODO Auto-generated method stub
		int ret=dao.updateCalendar(info);
		return ret==0?false:true;
	}

	@Override
	public List<CalendarDetailInfo> queryCalendarDetail(CalendarDetailInfo info)
			throws Exception {
		// TODO Auto-generated method stub
		return dao.queryCalendarDetail(info);
	}

	@Override
	public void addCalendarDetail(CalendarDetailInfo info) throws Exception {
		// TODO Auto-generated method stub
		dao.addCalendarDetail(info);
	}

	@Override
	public boolean updateCalendarDetail(CalendarDetailInfo info)
			throws Exception {
		// TODO Auto-generated method stub
		int ret=dao.updateCalendarDetail(info);
		return ret==0?false:true;
	}

	@Override
	public CalendarDetailInfo getCalendarDetailById(String id)
			throws Exception {
		// TODO Auto-generated method stub
		return dao.getCalendarDetailById(id);
	}

}
